home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 22
/
Cream of the Crop 22.iso
/
program
/
eflibpt4.zip
/
DEMO
/
TESTING
/
MEM1.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1996-07-21
|
960b
|
36 lines
{ Borland Pascal Extended Function Library - EFLIB (C) Johan Larsson, 1996
Testing; memory allocations via AllocationObjectType
EFLIB IS PROTECTED BY THE COPYRIGHT LAW AND MAY NOT BE COPIED, SOLD OR
MANIPULATED. FOR MORE INFORMATION, SEE PROGRAM MANUAL! THIS DEMONSTRAT-
ION PROGRAM MAY FREELY BE USED AND DISTRIBUTED. }
uses EFLIBMEM;
var Data1, Data2 : AllocationObjectType;
String1, String2 : string;
begin
String1 := 'This';
String2 := 'Nothing';
with Data1 do begin
Initialize (SizeOf(String1));
MoveIn (@String1, SizeOf(String1), 0);
{ Duplicate allocation }
Data2.InitializeEmpty;
Duplicate (@Data2);
Intercept;
end;
with Data2 do begin
MoveOut (@String2, DataSize, 0);
Intercept;
end;
WriteLn ('"', String2, '" should be equal to "', String1, '".');
end.